//
//  IdeaDetallHeadTableViewCell.m
//  LiangYa_BObject
//
//  Created by dllo on 15/10/29.
//  Copyright © 2015年 YuHao. All rights reserved.
//

#import "IdeaDetallHeadTableViewCell.h"

@implementation IdeaDetallHeadTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.myvisualEffectView = [[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]];
        _myvisualEffectView.alpha = 0.8;
        [self.contentView addSubview:self.myvisualEffectView];
        
        self.albumNameLabel = [[UILabel alloc] init];
        self.albumNameLabel.textAlignment = NSTextAlignmentCenter;
        self.albumNameLabel.font = [UIFont systemFontOfSize:20];
        [self.contentView addSubview:self.albumNameLabel];
        
        self.detailLabel = [[UILabel alloc] init];
//        if ([[NSUserDefaults standardUserDefaults]boolForKey:@"nightstyle"]) {
//            _detailLabel.backgroundColor = [UIColor colorWithRed:57/255.0 green:57/255.0 blue:57/255.0 alpha:1];
//        }else{
//            _detailLabel.backgroundColor = [UIColor whiteColor];
//
//        }
        self.detailLabel.numberOfLines = 0;
        [self.detailLabel sizeToFit];
        self.detailLabel.textAlignment = NSTextAlignmentCenter;
        [self.contentView addSubview:self.detailLabel];
        
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    _albumNameLabel.frame = CGRectMake(10,cellHeight - 120, cellWidth - 20,20);
    _myvisualEffectView.frame = CGRectMake(0,0,cellWidth,cellHeight);
    _detailLabel.frame = CGRectMake(10, cellHeight - 90, cellWidth - 20, 50);
        self.backgroundColor = [UIColor clearColor];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
